home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
Q-R
/
RPN Calculator.cpt
/
RPN Calculator
/
card_3030.txt
< prev
next >
Wrap
Text File
|
1988-09-16
|
79KB
|
3,572 lines
-- card: 3030 from stack: in
-- bmap block id: 4891
-- flags: 4000
-- background id: 2751
-- name: Calc
----- HyperTalk script -----
on opencard
global onedot
hide button "RPN Calc"
hide card field "M0"
hide card field "M9"
put empty into card field "M0"
put empty into card field "M9"
put "" into it
if card field "Name" = "" or card field "Pname" = "" then
ask "Enter your name"
if it = "" or it = " " then
go home
exit opencard
end if
put "User is: " & it into card field "Name"
put " " & last word of it into card field "Pname"
set userlevel to 4
doMenu "Compact Stack"
set userlevel to 2
end if
hide card field "List"
hide card field "xtest"
-- RESET FOLLOWING FOR DISTRIBUTION
-- set userLevel to 2
-- hide menubar
put 0 into onedot
end opencard
function tolabel L
global pos
put 2 into temp
put field "list" of card "PG" into list
put line temp of list into t
repeat while t <> ""
if first char of first word of t = "#" and second char of first word of t = L then
put temp into pos
return 1
end if
add 1 to temp
put line temp of list into t
end repeat
return 0
end tolabel
on passby
global pos
put pos + 1 into pos
put line pos of field "list" of card "PG" into temp
if temp = "GTo" or temp = "Inv" then
put pos + 1 into pos
end if
end passby
function memop m
global mtask, prog
if prog = 1 then
put return & "'" & second char of m after last line of field "list" of card "PG"
end if
put 1 into r
if mtask = "s" then
put line 4 of card field "Regs" into card field m
else if mtask = "r" then
pushup
put card field m into line 4 of card field "Regs"
else if mtask = "s+" then
add line 4 of card field "Regs" to card field m
else if mtask = "c" then
put "" into card field m
else
show card field m
put 0 into r
end if
put "" into mtask
return r
end memop
function fact z
global nform
set numberFormat to "0.000000000000000000000000"
put 1 into m
repeat while z > 1
put (z * m) into m
put (z - 1) into z
end repeat
if z < 1 then put Gm(z) * m into m
set numberFormat to nform
return m
end fact
function Gm x -- from "Handbook of Mathematical Functions"
-- edited by M. Abramowitz and I. Segun, Dover Publ.
set numberFormat to "0.000000000000000000000000"
put (((((((x*.035868343 - .193527818)*x+.482199394)*x-.756704078)* x+.918206857)*x-.897056937)*x+.988205891)*x-.577191652)*x+1 into Result
return Result
end Gm
function hlp m
if the optionKey is down then
put card field "Regs" into temp
put m into card field "Regs"
wait until the optionKey is up
put temp into card field "Regs"
end if
return 1
end hlp
on idle
if last word of card field "Name" <> last word of card field "Pname" then
go Home
else
if the userLevel <> 5 then hide menuBar
pass idle
end if
end idle
-- part 1 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=16 top=26 right=56 bottom=53
-- title width / last selected line: 0
-- icon id / first selected line: 1011 / 1011
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
visual effect iris close
go home
end mouseUp
-- part 2 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=71 top=71 right=135 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Regs
----- HyperTalk script -----
on mouseUp
put the mouseLoc into card field M1
end mouseUp
-- part 3 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=71 top=209 right=226 bottom=101
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '7
----- HyperTalk script -----
on mouseUp
global prog
check
put "7" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'7" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 4 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=71 top=230 right=246 bottom=101
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '4
----- HyperTalk script -----
on mouseUp
global prog
global mtask
if mtask <> "" then
get memop("M4")
exit mouseUp
end if
check
put "4" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'4" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=71 top=250 right=265 bottom=101
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '1
----- HyperTalk script -----
on mouseUp
global prog, mtask
if mtask <> "" then
get memop("M1")
exit mouseUp
end if
check
put "1" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'1" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 6 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=71 top=268 right=284 bottom=101
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '0
----- HyperTalk script -----
on mouseUp
global prog, mtask
if mtask <> "" then
get memop("M0")
exit mouseUp
end if
check
put "0" after last char in line 4 of card field "Regs"
if prog = 1 then
put return & "'0" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 7 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=107 top=268 right=284 bottom=137
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: .
----- HyperTalk script -----
on mouseUp
global prog
check
if offset(".",line 4 of card field "Regs") = 0 then
put "." after last char of line 4 of card field "Regs"
end if
if prog = 1 then
put return & "." after last line of field "list" of card "PG"
end if
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=107 top=250 right=265 bottom=137
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '2
----- HyperTalk script -----
on mouseUp
global prog
global mtask
if mtask <> "" then
get memop("M2")
exit mouseUp
end if
check
put "2" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'2" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=107 top=230 right=246 bottom=137
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '5
----- HyperTalk script -----
on mouseUp
global prog
check
put "5" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'5" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 10 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=107 top=209 right=226 bottom=137
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '8
----- HyperTalk script -----
on mouseUp
global prog
check
put "8" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'8" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=142 top=209 right=226 bottom=172
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '9
----- HyperTalk script -----
on mouseUp
global prog, mtask
if mtask <> "" then
get memop("M9")
exit mouseUp
end if
check
put "9" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'9" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=142 top=230 right=246 bottom=172
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '6
----- HyperTalk script -----
on mouseUp
global prog
check
put "6" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'6" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=142 top=250 right=265 bottom=172
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: '3
----- HyperTalk script -----
on mouseUp
global prog
global mtask
if mtask <> "" then
get memop("M3")
exit mouseUp
end if
check
put "3" after last char of line 4 of card field "Regs"
if prog = 1 then
put return & "'3" after last line of field "list" of card "PG"
end if
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=142 top=268 right=285 bottom=182
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: E
----- HyperTalk script -----
on mouseUp
global flag
global prog
if prog = 1 then
put return & "E" after last line of field "list" of card "PG"
end if
if flag = 1 then
pushup
put line 3 of card field "Regs" into line 4 of card field "Regs"
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Enters a value into the x register so that the next value" & " will lift the stack.")
end mouseWithin
-- part 15 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=189 top=250 right=267 bottom=219
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: +
----- HyperTalk script -----
on mouseUp
global nform
global prog
if prog = 1 then
put return & "+" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" + line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
funcdrop
end mouseUp
on mouseWithin
get hlp("Adds y to x.")
end mouseWithin
-- part 16 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=189 top=229 right=247 bottom=219
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: -
----- HyperTalk script -----
on mouseUp
global nform
global prog
if prog = 1 then
put return & "-" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" - line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
funcdrop
end mouseUp
on mouseWithin
get hlp("Subtracts x from y.")
end mouseWithin
-- part 17 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=189 top=208 right=226 bottom=219
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: *
----- HyperTalk script -----
on mouseUp
global nform
global prog
if prog = 1 then
put return & "*" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 4 of card field "Regs" * line 3 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
funcdrop
end mouseUp
on mouseWithin
get hlp("Multiplies x by y.")
end mouseWithin
-- part 18 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=188 top=187 right=205 bottom=218
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: ÷
----- HyperTalk script -----
on mouseUp
global nform
global prog
global error
if prog = 1 then
put return & "√∑" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> 0 and line 4 of card field "Regs" <> "" then
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" / line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
funcdrop
else
put 1 into error
beep
end if
end mouseUp
on mouseWithin
get hlp("Divides y by x.")
end mouseWithin
-- part 19 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=188 top=166 right=184 bottom=218
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: √
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
global error
if prog = 1 then
put return & "‚àö" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" >= 0 then
set numberFormat to "0.000000000000000000000000"
put sqrt(line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts square root of x into x.")
end mouseWithin
-- part 20 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=230 right=248 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rdn
----- HyperTalk script -----
on mouseUp
global prog
global flag
if prog = 1 then
put return & "Rdn" after last line of field "list" of card "PG"
end if
put line 4 of card field "Regs" into temp
delete line 4 of card field "Regs"
put return before first char of line 1 of card field "Regs"
put temp into line 1 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Rolls calculator stack down, with x --> t")
end mouseWithin
-- part 21 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=187 right=205 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x-y
----- HyperTalk script -----
on mouseUp
global prog
global flag
if prog = 1 then
put return & "x-y" after last line of field "list" of card "PG"
end if
put line 4 of card field "Regs" into temp
put line 3 of card field "Regs" into line 4 of card field "Regs"
put temp into line 3 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Exchanges the values in the x and y registers.")
end mouseWithin
-- part 22 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=224 top=269 right=286 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: clrx
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put return & "clrx" after last line of field "list" of card "PG"
end if
put "" into line 4 of card field "Regs"
end mouseUp
on mouseWithin
get hlp("Clears only the x register.")
end mouseWithin
-- part 23 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=398 top=145 right=163 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: R-D
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "R-D" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 4 of card field "Regs" * 180 / pi into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Assumes x is in radians and converts to degrees.")
end mouseWithin
-- part 24 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=145 right=163 bottom=291
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: inv
----- HyperTalk script -----
on mouseUp
global prog
global invflg
if prog = 1 then
put return & "inv" after last line of field "list" of card "PG"
end if
put 1 into invflg
show button "I"
end mouseUp
on mouseWithin
get hlp("Sets up for inverse function of buttons in striped areas.")
end mouseWithin
-- part 25 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=295 top=145 right=163 bottom=326
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: sin
----- HyperTalk script -----
on mouseUp
global invflg
global flag
global aflag
global Result
global nform
global tmode
global prog
global error
if prog = 1 then
put return & "sin" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
if tmode = "deg" then
put line 4 of card field "Regs" * pi / 180 into ang
else
put line 4 of card field "Regs" into ang
end if
if invflg = 0 then
if tmode = "deg" then
put line 4 of card field "Regs" * pi / 180 into ang
else
put line 4 of card field "Regs" into ang
end if
put sin(ang) into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 0 into aflag
put line 4 of card field "Regs" into temp
if temp = "" or abs(temp) > 1 then
beep
put 1 into error
exit mouseUp
end if
arcsin
put Result into ang
if tmode = "deg" then
put ang * 180 / pi into r
else
put ang into r
end if
set numberFormat to nform
put r into line 4 of card field "Regs"
end if
put 1 into flag
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Sin of value in x, or arcsin if inv set.")
end mouseWithin
-- part 26 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=259 top=118 right=135 bottom=441
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: M1
----- HyperTalk script -----
on mouseUp
hide card field "M1"
hide card field "M2"
hide card field "M3"
hide card field "M4"
end mouseUp
-- part 27 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=259 top=102 right=119 bottom=441
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: M2
----- HyperTalk script -----
on mouseUp
hide card field "M2"
hide card field "M3"
hide card field "M4"
end mouseUp
-- part 28 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=259 top=86 right=103 bottom=441
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: M3
----- HyperTalk script -----
on mouseUp
hide card field "M3"
hide card field "M4"
end mouseUp
-- part 30 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=145 right=163 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: chs
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "chs" after last line of field "list" of card "PG"
end if
set numberFormat to nform
put - line 4 of card field "Regs" into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Changes the sign of the value in x.")
end mouseWithin
-- part 31 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=296 top=187 right=204 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ln
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
global error
if prog = 1 then
put return & "Ln" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
set numberFormat to "0.000000000000000000000000"
put ln(line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Natural log of x")
end mouseWithin
-- part 32 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=329 top=145 right=163 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: cos
----- HyperTalk script -----
on mouseUp
global flag
global aflag
global invflg
global nform
global Result
global tmode
global prog
global error
if prog = 1 then
put return & "cos" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
if invflg = 0 then
if tmode = "deg" then
put line 4 of card field "Regs" * pi / 180 into ang
else
put line 4 of card field "Regs" into ang
end if
put cos(ang) into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into aflag
put line 4 of card field "Regs" into temp
if temp = "" or abs(temp) > 1 then
put 1 into error
beep
exit mouseUp
end if
arcsin
put Result into ang
if tmode = "deg" then
put ang * 180 / pi into r
else
put ang into r
end if
set numberFormat to nform
put r into line 4 of card field "Regs"
end if
put 1 into flag
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("cos of value in x, or arccos if inv flag set.")
end mouseWithin
-- part 33 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=187 right=205 bottom=464
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: log
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
global error
if prog = 1 then
put return & "log" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
set numberFormat to "0.000000000000000000000000"
put ln(line 4 of card field "Regs")*.43429448190325182765 into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Log to the base 10 of the value in x.")
end mouseWithin
-- part 34 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=432 top=145 right=163 bottom=462
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: D-R
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "D-R" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 4 of card field "Regs" * pi / 180 into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Assumes x is in degrees and converts to radians.")
end mouseWithin
-- part 35 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=329 top=187 right=205 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: exp
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "exp" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put exp(line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Calculates e to the power in x")
end mouseWithin
-- part 36 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=363 top=145 right=163 bottom=394
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: tan
----- HyperTalk script -----
on mouseUp
global flag
global invflg
global nform
global tmode
global prog
if prog = 1 then
put return & "tan" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
if invflg = 0 then
if tmode = "deg" then
put line 4 of card field "Regs" * pi / 180 into ang
else
put line 4 of card field "Regs" into ang
end if
put sin(ang) into t1
put cos(ang) into t2
put t1/t2 into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put atan(line 4 of card field "Regs") into ang
if tmode = "deg" then
put ang * 180 / pi into r
else
put ang into r
end if
set numberFormat to nform
put r into line 4 of card field "Regs"
end if
put 1 into flag
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("tan of value in x, or arctan if inv flag set.")
end mouseWithin
-- part 37 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=187 right=205 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: alg
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "alog" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put exp(line 4 of card field "Regs" / .43429448190325182765) into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Calculates 10 to the power in x.")
end mouseWithin
-- part 38 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=166 right=184 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: 1/x
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
global error
if prog = 1 then
put return & "1/x" after last line of field "list" of card "PG"
end if
set numberFormat to nform
if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
set numberFormat to "0.000000000000000000000000"
put 1.0 / line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts the inverse of x into x.")
end mouseWithin
-- part 41 (button)
-- low flags: 00
-- high flags: 0006
-- rect: left=472 top=67 right=79 bottom=489
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Show Registers
----- HyperTalk script -----
on mouseUp
show card field "Regs"
show card field "M1"
show card field "M2"
show card field "M3"
show card field "M4"
if the commandKey is Down then
show card field "M0"
show card field "M9"
end if
end mouseUp
on mouseWithin
get hlp("Shows stack and memory registers. " & "Press cmd key to also show plot min max registers")
end mouseWithin
-- part 47 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=71 top=188 right=205 bottom=103
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sto
----- HyperTalk script -----
on mouseUp
global flag
global prog
global mtask
if prog = 1 then
put return & "Sto" after last line of field "list" of card "PG"
end if
put "s" into mtask
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Stores x into memory n, " & "where n is number key [1-4] clicked after Sto.")
end mouseWithin
-- part 48 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=188 top=145 right=163 bottom=218
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x^2
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "x^2" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> "" then
set numberFormat to "0.000000000000000000000000"
put line 4 of card field "Regs" * line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts square of x into x.")
end mouseWithin
-- part 49 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=142 top=166 right=183 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: %
----- HyperTalk script -----
on mouseUp
global flag
global prog
global nform
global error
if prog = 1 then
put return & "%" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" * line 4 of card field "Regs" into r
put r / 100 into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts x% of y into x.")
end mouseWithin
-- part 50 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=107 top=188 right=205 bottom=139
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sto+
----- HyperTalk script -----
on mouseUp
global flag
global prog
global mtask
if prog = 1 then
put return & "Sto+" after last line of field "list" of card "PG"
end if
put "s+" into mtask
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Add x to memory n, " & "where n [1-4] is number clicked after Sto+.")
end mouseWithin
-- part 52 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=209 right=226 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rup
----- HyperTalk script -----
on mouseUp
global flag
global prog
if prog = 1 then
put return & "Rup" after last line of field "list" of card "PG"
end if
put line 1 of card field "Regs" into temp
pushup
put temp into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Rolls calculator stack up, with t --> x.")
end mouseWithin
-- part 53 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=250 right=267 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: clr
----- HyperTalk script -----
on mouseUp
global flag
global prog
if prog = 1 then
put return & "clr" after last line of field "list" of card "PG"
end if
put 1 into flag
put "" into card field "Regs"
end mouseUp
on mouseWithin
get hlp("Clears all registers in the calculator stack.")
end mouseWithin
-- part 54 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=208 right=226 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: !
----- HyperTalk script -----
on mouseUp
global flag
global prog
global error
if prog = 1 then
put return & "!" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <= 54 and line 4 of card field "Regs" >= 0 then
put line 4 of card field "Regs" into temp
put fact(temp) into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Calculates factorial of x if integer, or " & "Gamma(x+1) if not. Note that [0≤x≤54].")
end mouseWithin
-- part 55 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=230 right=247 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ClM
----- HyperTalk script -----
on mouseUp
global prog
global mtask
if prog = 1 then
put return & "ClM" after last line of field "list" of card "PG"
end if
put "" into card field "M1"
put "" into card field "M2"
put "" into card field "M3"
put "" into card field "M4"
put "" into card field "M0"
put "" into card field "M9"
end mouseUp
on mouseWithin
get hlp("Clears all memory registers.")
end mouseWithin
-- part 56 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=142 top=188 right=205 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rcl
----- HyperTalk script -----
on mouseUp
global flag
global prog
global mtask
put 1 into flag
if prog = 1 then
put return & "Rcl" after last line of field "list" of card "PG"
end if
put "r" into mtask
end mouseUp
on mouseWithin
get hlp("Recalls value in memory n, " & "where n [1-4] is number clicked after Rcl.")
end mouseWithin
-- part 57 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=296 top=209 right=226 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fix
----- HyperTalk script -----
on mouseUp
global nform, prog, running, pos
if prog = 1 then
put return & "Fix" after last line of field "list" of card "PG"
end if
if running = 0 then
ask "Number of decimal places:" with 4
else
put pos + 1 into pos
put line pos of field "list" of card "PG" into it
end if
if it > 18 or it < 0 then put 4 into it
put "0." into nform
repeat with i = 1 to it
put "0" after last char of nform
end repeat
if prog = 1 then
put return & it after last line of card field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Sets number of decimal places displayed in all registers.")
end mouseWithin
-- part 58 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=269 right=286 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: <->
----- HyperTalk script -----
on mouseUp
global flag
global prog
if prog = 1 then
put return & "<->" after last line of field "list" of card "PG"
end if
put line 4 of card field "Regs" into card field "bigreg"
show card field "bigreg"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts x register into large register under calculator")
end mouseWithin
-- part 59 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=145 right=163 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: π
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "π" after last line of field "list" of card "PG"
end if
set numberFormat to nform
if line 4 of card field "Regs" <> "" then pushup
put pi into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts pi into the x register. Ignores decimal setting.")
end mouseWithin
-- part 61 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=20 top=300 right=322 bottom=38
-- title width / last selected line: 0
-- icon id / first selected line: 1015 / 1015
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Set Home
----- HyperTalk script -----
on mouseUp
show button "RPN Calc"
answer "Install calculator icon on the home card?" with "yes" or "no"
if it = "yes" then
if the userLevel < 4 then set userLevel to 4
choose button tool
click at loc of button "RPN Calc"
doMenu "Copy Button"
choose browse tool
visual effect dissolve
go to home
doMenu "Paste Button"
answer "Drag Button to location, type Cmd-Tab"
end if
hide button "RPN Calc"
hide me
end mouseUp
on mouseWithin
get hlp("Installs the calculator icon on the home card.")
end mouseWithin
-- part 62 (button)
-- low flags: 80
-- high flags: 8000
-- rect: left=5 top=255 right=300 bottom=55
-- title width / last selected line: 0
-- icon id / first selected line: 6239 / 6239
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: RPN Calc
----- HyperTalk script -----
on mouseUp
visual effect iris open
go to stack "RPN Calculator"
end mouseUp
-- part 64 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=60 top=289 right=322 bottom=481
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: bigreg
----- HyperTalk script -----
on mouseUp
hide card field bigreg
end mouseUp
-- part 65 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=259 top=71 right=87 bottom=441
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: M4
----- HyperTalk script -----
on mouseUp
hide card field "M4"
end mouseUp
-- part 66 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=166 right=184 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Deg
----- HyperTalk script -----
on mouseUp
global tmode
global prog
if prog = 1 then
put return & "Deg" after last line of field "list" of card "PG"
end if
put "deg" into tmode
put "Deg" into card field DR
end mouseUp
on mouseWithin
get hlp("Sets calculator to accept degree angle measure for " & "trig functions.")
end mouseWithin
-- part 67 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=330 top=209 right=226 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sci
----- HyperTalk script -----
on mouseUp
global nform, prog, running, pos
if prog = 1 then
put return & "Sci" after last line of field "list" of card "PG"
end if
if running = 0 then
ask "Number of decimal places:" with 4
else
put pos + 1 into pos
put line pos of field "list" of card "PG" into it
end if
if it > 18 or it < 0 then put 4 into it
put "0." into nform
repeat with i = 1 to it
put "#" after last char of nform
end repeat
if prog = 1 then
put return & it after last line of card field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Sets number of decimal places displayed in registers." & " Trailing 0's not shown.")
end mouseWithin
-- part 68 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=331 top=269 right=286 bottom=361
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: B
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
if tolabel("B") = 1 then
send mouseUp to button "R/S"
else
beep
end if
else
put return & "#B" after last line of field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Starts program at first label B found in program.")
end mouseWithin
-- part 69 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=364 top=269 right=286 bottom=395
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: C
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
if tolabel("C") = 1 then
send mouseUp to button "R/S"
else
beep
end if
else
put return & "#C" after last line of field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Starts program at first label C found in program.")
end mouseWithin
-- part 70 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=166 right=184 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rad
----- HyperTalk script -----
on mouseUp
global tmode
global prog
if prog = 1 then
put return & "Rad" after last line of field "list" of card "PG"
end if
put "rad" into tmode
put "Rad" into card field DR
end mouseUp
on mouseWithin
get hlp("Sets calculator to accept radian angle measure for " & "trig functions.")
end mouseWithin
-- part 71 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=364 top=230 right=247 bottom=394
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Lbl
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
ask "Label:"
put return & "#" & it after last line of field "list" of card "PG"
else
beep
end if
end mouseUp
on mouseWithin
get hlp("Records a single character label in the program.")
end mouseWithin
-- part 72 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=250 right=268 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: R/S
----- HyperTalk script -----
on mouseUp
global prog, pos, running, error
put 0 into error
if prog = 1 then
put return & "R/S" after last line of field "list" of card "PG"
else
put field "list" of card "PG" into list
put line pos of list into t
if t = "" then
put 0 into running
else
put 1 into running
hide card field "Regs"
send mouseUp to card field "M1"
set the cursor to 4
end if
repeat until t = ""
if t = "R/S" then
put pos + 1 into pos
hide card field RnInd
finish
exit mouseUp
else if t = "GTo" then
put pos + 1 into pos
put line pos of list into it
put first char of it into temp
get tolabel(temp)
put "#" into t
else if t = "GSb" then
put pos + 1 into pos
put line pos of list into it
put first char of it into temp
get tolabel(temp)
put pos into ret
put "#" into t
else if t = "Rtn" then
put ret into pos
put "#" into t
end if
if t <> "" and first char of t <> "#" then
send mouseUp to button t
end if
if error = 1 then
answer "Function Error"
finish
exit mouseUp
end if
add 1 to pos
put line pos of list into t
end repeat
put 2 into pos
finish
end if
end mouseUp
on finish
global running
show card field "Regs"
put 0 into running
end finish
on mouseWithin
get hlp("Starts the program running at the current step," & " or stops program if recorded in program.")
end mouseWithin
-- part 73 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=364 top=250 right=267 bottom=394
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: GTo
----- HyperTalk script -----
on mouseUp
global pos
global prog
if prog = 1 then
put return & "GTo" after last line of field "list" of card "PG"
ask "Branch to label:"
put return & it after last line of field "list" of card "PG"
else
ask "Go to label:" with "start"
if it = "start" then put 2 into pos
else
put first char of it into t
put tolabel(t) into r
end if
end if
end mouseUp
on mouseWithin
get hlp("Puts program pointer at specified label " & "('start' of program, or single character label).")
end mouseWithin
-- part 74 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=296 top=230 right=248 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Trnc
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put return & "Trnc" after last line of field "list" of card "PG"
end if
put trunc(line 4 of card field "Regs") into line 4 of card field "Regs"
end mouseUp
on mouseWithin
get hlp("Truncates the value in the x register to an integer.")
end mouseWithin
-- part 75 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=269 right=286 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: D
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
if tolabel("D") = 1 then
send mouseUp to button "R/S"
else
beep
end if
else
put return & "#D" after last line of field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Starts program at first label D found in program.")
end mouseWithin
-- part 76 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=230 right=247 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ClP
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put "Program" into field "list" of card "PG"
else
beep
answer "Put in prog mode to clear program"
end if
end mouseUp
on mouseWithin
get hlp("Clears the program memory. " & return & "Only operates if in program mode.")
end mouseWithin
-- part 77 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=250 right=268 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Prg
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
put 1 into prog
show card field "PrgInd"
else
put 0 into prog
hide card field "PrgInd"
end if
end mouseUp
on mouseWithin
get hlp("Toggles program mode on and off. When on, " & "click on Program field to edit program.")
end mouseWithin
-- part 78 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=330 top=230 right=248 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rnd
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put return & "Rnd" after last line of field "list" of card "PG"
end if
put round(line 4 of card field Regs) into line 4 of card field Regs
end mouseUp
on mouseWithin
get hlp("Rounds the value in the x register to an integer.")
end mouseWithin
-- part 79 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=230 right=247 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: SSt
----- HyperTalk script -----
on mouseUp
global prog
global pos
global running
global error
put 0 into error
if prog = 1 then
beep
exit mouseUp
end if
put line pos of field "list" of card "PG" into t
if t = "" then
put 0 into running
else
put 1 into running
show card field "RnInd"
put t into card field bigreg
show card field "bigreg"
end if
if t = "R/S" then
put pos + 1 into pos
hide card field RnInd
finish
exit mouseUp
end if
if t = "GTo" or t = "GSb" then
put pos + 1 into pos
put line pos of field "list" of card "PG" into it
put it into t
put second char of first word in it into temp
put tolabel(temp) into r
put pos + 1 into pos
put t into line 2 of card field "bigreg"
put pos into ret
finish
exit mouseUp
end if
if t = "Rtn" then
put ret into pos
finish
exit mouseUp
end if
if t <> "" and first char of t <> "#" then
send mouseUp to button t
end if
if error = 1 then
answer "Function Error"
finish
exit mouseUp
end if
put pos + 1 into pos
finish
end mouseUp
on finish
hide card field RnInd
put 0 into running
end finish
on mouseWithin
get hlp("Runs the program one step for each click." & " Operation is shown in register under calculator.")
end mouseWithin
-- part 80 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=297 top=269 right=286 bottom=328
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: A
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
if tolabel("A") = 1 then
send mouseUp to button "R/S"
else
beep
end if
else
put return & "#A" after last line of field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Starts program at first label A found in program.")
end mouseWithin
-- part 81 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=331 top=250 right=267 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: KBd
----- HyperTalk script -----
on mouseUp
check
get the rect of card field "Regs"
put it into c
delete item 2 of c
delete item 2 of c
add 6 to item 1 of c
subtract 10 from item 2 of c
click at c
end mouseUp
on mouseWithin
get hlp("Puts cursor in register x for keyboard number entry.")
end mouseWithin
-- part 83 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=466 top=84 right=101 bottom=495
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: DR
----- HyperTalk script -----
on mouseWithin
get hlp("[Deg] = degree mode" & return & "[Rad] = radian mode.")
end mouseWithin
-- part 89 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=269 right=286 bottom=463
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: E
----- HyperTalk script -----
on mouseUp
global prog
if prog = 0 then
if tolabel("E") = 1 then
send mouseUp to button "R/S"
else
beep
end if
else
put return & "#E" after last line of field "list" of card "PG"
end if
end mouseUp
on mouseWithin
get hlp("Starts program at first label E found in program.")
end mouseWithin
-- part 90 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=166 right=184 bottom=291
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x=0
----- HyperTalk script -----
on mouseUp
global prog
global invflg
if prog = 1 then
put return & "x=0" after last line of field "list" of card "PG"
else
if invflg = 0 then
if line 4 of card field "Regs" <> 0 then
passby
end if
else
if line 4 of card field "Regs" = 0 then
passby
end if
end if
end if
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Tests for x=0 within a program, or x≠0 if inv flag set.")
end mouseWithin
-- part 91 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=295 top=166 right=184 bottom=327
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x>0
----- HyperTalk script -----
on mouseUp
global prog
global invflg
if prog = 1 then
put return & "x>0" after last line of field "list" of card "PG"
else
if invflg = 0 then
if line 4 of card field "Regs" <= 0 then
passby
end if
else
if line 4 of card field "Regs" > 0 then
passby
end if
end if
end if
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Tests for x>0 in program, or x≤0 if inv flag set.")
end mouseWithin
-- part 92 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=329 top=166 right=184 bottom=360
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x<0
----- HyperTalk script -----
on mouseUp
global prog
global invflg
if prog = 1 then
put return & "x<0" after last line of field "list" of card "PG"
else
if invflg = 0 then
if line 4 of card field "Regs" >= 0 then
passby
end if
else
if line 4 of card field "Regs" < 0 then
passby
end if
end if
end if
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Tests for x<0 in program, or x‚â•0 if inv flag set.")
end mouseWithin
-- part 94 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=364 top=187 right=205 bottom=394
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Ln1
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
global error
if prog = 1 then
put return & "Ln1" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> "" and line 4 of card field "Regs" <> 0 then
set numberFormat to "0.000000000000000000000000"
put ln1(line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Natural log of 1 plus the number in x as:" & return & "ln(1+x)")
end mouseWithin
-- part 93 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=363 top=166 right=184 bottom=394
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: x≤y
----- HyperTalk script -----
on mouseUp
global prog
global invflg
if prog = 1 then
put return & "x≤y" after last line of field "list" of card "PG"
else
if invflg = 0 then
if line 4 of card field "Regs" > line 3 of card field "Regs" then
passby
end if
else
if line 4 of card field "Regs" <= line 3 of card field "Regs" then
passby
end if
end if
end if
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Tests for x≤y in program, or x>y if inv flag set.")
end mouseWithin
-- part 95 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=187 right=205 bottom=428
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ex1
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "ex1" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put exp1(line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Natural exponent of number in x minus 1:" & return & "exp(x) - 1")
end mouseWithin
-- part 96 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=166 right=183 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ann
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "ann" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put annuity(line 3 of card field "Regs",line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Present value of one payment unit." & return & "y = periodic rate" & return & "x = no. of periods")
end mouseWithin
-- part 97 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=209 right=227 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: cpd
----- HyperTalk script -----
on mouseUp
global flag
global nform
global prog
if prog = 1 then
put return & "cpd" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put compound(line 3 of card field "Regs",line 4 of card field "Regs") into r
set numberFormat to nform
put r into line 4 of card field "Regs"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Future value of one periodic payment unit." & return & "y = periodic rate" & return & "x = no. of periods")
end mouseWithin
-- part 98 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=223 top=187 right=205 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: mod
----- HyperTalk script -----
on mouseUp
global nform
global prog
global error
if prog = 1 then
put return & "mod" after last line of field "list" of card "PG"
end if
if line 4 of card field "Regs" <> 0 and line 4 of card field "Regs" <> "" and line 3 of card field "Regs" <> "" then
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" mod line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
funcdrop
else
put 1 into error
beep
end if
end mouseUp
on mouseWithin
get hlp("Puts remainer after dividing y by x into x")
end mouseWithin
-- part 99 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=364 top=209 right=226 bottom=393
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: y^x
----- HyperTalk script -----
on mouseUp
global nform
global prog
if prog = 1 then
put return & "y^x" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
if line 3 of card field "Regs" <> "" then
put line 3 of card field "Regs" ^ line 4 of card field "Regs" into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
beep
end if
funcdrop
end mouseUp
on mouseWithin
get hlp("Calculates y to the power in x.")
end mouseWithin
-- part 85 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=10 top=72 right=88 bottom=57
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: PrgInd
----- HyperTalk script -----
on mouseUp
go to card "PG"
end mouseUp
-- part 100 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=10 top=116 right=133 bottom=57
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: RnInd
-- part 111 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=260 top=250 right=267 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cl∑
----- HyperTalk script -----
on mouseUp
global prog
global flag
global sm
global smsq
global cnt
if prog = 1 then
put return & "Cl‚àë" after last line of card field "list" of card "PG"
end if
put 0 into sm
put 0 into smsq
put 0 into cnt
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Clears all statistical registers. " & return & "Use before entering any new set of data.")
end mouseWithin
-- part 101 (field)
-- low flags: 80
-- high flags: 0002
-- rect: left=64 top=294 right=312 bottom=254
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: kbd
-- part 112 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=230 right=247 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ClL
----- HyperTalk script -----
on mouseUp
global prog
global flag
if prog = 1 then
put return & "ClL" after last line of field "list" of card "PG"
end if
put "" into card field "List"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Clears list.")
end mouseWithin
-- part 113 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=297 top=250 right=267 bottom=328
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Abs
----- HyperTalk script -----
on mouseUp
global prog
global flag
if prog = 1 then
put return & "Abs" after last line of field "list" of card "PG"
end if
put abs(line 4 of card field "Regs") into line 4 of card field "Regs"
put 1 into flag
end mouseUp
-- part 114 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=399 top=209 right=226 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: GSb
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put return & "GSb" after last line of field "list" of card "PG"
answer "Subroutine label:"
put it after last line of field "list" of card "PG"
else
beep
end if
end mouseUp
on mouseWithin
get hlp("Branches program to sub-routine with the specified label.")
end mouseWithin
-- part 115 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=106 top=166 right=183 bottom=139
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Sh∑
----- HyperTalk script -----
on mouseUp
global prog
global sm
global smsq
global cnt
if prog = 1 then
put return & "Sh‚àë" after last line of field "list" of card "PG"
end if
put sm into line 1 of card field "Regs"
put smsq into line 2 of card field "Regs"
end mouseUp
on mouseWithin
get hlp("t = sum" & return & "z = sum of squares" & return & "Shows above values from statistical calculations.")
end mouseWithin
-- part 116 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=71 top=166 right=183 bottom=103
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Stat
----- HyperTalk script -----
on mouseUp
global prog
global flag
global error
global cnt
global sm
global smsq
if prog = 1 then
put return & "Stat" after last line of field "list" of card "PG"
end if
if cnt > 1 then
put sm / cnt into m
put m into line 4 of card field "Regs"
put smsq / cnt - (m * m) into t
put t * cnt / (cnt - 1) into t
put t into line 2 of card field "Regs"
put sqrt(t) into line 3 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Single value statistics:" & return & "z = variance" & return & "y = unbiased standard dev." & return & "x = average (mean)")
end mouseWithin
-- part 117 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=71 top=145 right=162 bottom=103
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Py,x
----- HyperTalk script -----
on mouseUp
global prog
global error
if prog = 1 then
put return & "Py,x" after last line of field "list" of card "PG"
end if
put line 3 of card field "Regs" into n
put line 4 of card field "Regs" into r
if n > 54 or r > 54 then
beep
put 1 into error
exit mouseUp
else
put fact(n) / fact(n - r) into line 4 of card field "Regs"
funcdrop
end if
end mouseUp
on mouseWithin
get hlp("Permutation of y objects taken x at a time." & return & return & "Ex: P(5,3) = 60")
end mouseWithin
-- part 118 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=106 top=145 right=162 bottom=138
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Cy,x
----- HyperTalk script -----
on mouseUp
global prog
global error
if prog = 1 then
put return & "Cy,x" after last line of field "list" of card "PG"
end if
put line 3 of card field "Regs" into n
put line 4 of card field "Regs" into r
if n > 54 or r > 54 then
beep
put 1 into error
exit mouseUp
else
put fact(n) / fact(n - r) / fact(r) into line 4 of card field "Regs"
funcdrop
end if
end mouseUp
on mouseWithin
get hlp("Combinations of y objects taken x at a time." & return & return & "Ex: C(5,3) = 10")
end mouseWithin
-- part 119 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=141 top=145 right=162 bottom=173
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Δ%
----- HyperTalk script -----
on mouseUp
global prog
global flag
global error
global nform
if prog = 1 then
put return & "∆%" after last line of field "list" of card "PG"
end if
set numberFormat to "0.000000000000000000000000"
put line 3 of card field "Regs" into a
put line 4 of card field "Regs" into b
if a <> 0 and a <> "" then
put (b - a) * 100 / a into r
set numberFormat to nform
put r into line 4 of card field "Regs"
else
put 1 into error
beep
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Percent change of x from y")
end mouseWithin
-- part 126 (field)
-- low flags: 80
-- high flags: 0007
-- rect: left=59 top=288 right=335 bottom=502
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: LIst
-- part 120 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=433 top=209 right=226 bottom=464
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Rtn
----- HyperTalk script -----
on mouseUp
global prog
if prog = 1 then
put return & "Rtn" after last line of field "list" of card "PG"
else
beep
end if
end mouseUp
on mouseWithin
get hlp("Returns control to the step after a sub-routine was called.")
end mouseWithin
-- part 121 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=189 top=269 right=286 bottom=220
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: ∑+
----- HyperTalk script -----
on mouseUp
global flag
global prog
global cnt
global sm
global smsq
global invflg
if prog = 1 then
put return & "‚àë+" after last line of field "list" of card "PG"
end if
get line 4 of card field "Regs"
if invflg = 0 then
add it to sm
add it * it to smsq
add 1 to cnt
else
if cnt >= 1 then
subtract it from sm
subtract it * it from smsq
subtract 1 from cnt
end if
put 0 into invflg
hide button "I"
end if
put cnt into card field "bigreg"
show card field "bigreg"
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Enters x and calculates count, sum and sum of squares" & " into stat registers. [inv][‚àë+] = [‚àë-]")
end mouseWithin
-- part 122 (button)
-- low flags: 00
-- high flags: 8004
-- rect: left=466 top=250 right=267 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Lst
----- HyperTalk script -----
on mouseUp
global prog
global flag
if prog = 1 then
put return & "Lst" after last line of field "list" of card "PG"
else
if the commandKey is down then
set the visible of card field "List" to not the visible of card field "List"
else
if card field "List" is not empty then
put "," & line 4 of card field "Regs" after last char of card field "List"
else
put line 4 of card field "Regs" after last char of card field "List"
end if
end if
end if
put 1 into flag
end mouseUp
on mouseWithin
get hlp("Puts x at end of list. " & return & "With cmd_key: toggles list visibility " & "(can dbl clk & press cmd-c to copy).")
end mouseWithin
-- part 123 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=470 top=269 right=286 bottom=492
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseUp
global prog
put "Written in HyperTalk by C. Kingston" into card field "bigreg"
show card field "bigreg"
end mouseUp
on mouseWithin
get hlp("RPN Calculator" & return & "Version .91" & return & " © 1987 by C. Kingston." & return & " All rights reserved.")
end mouseWithin
-- part 124 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=115 top=46 right=62 bottom=440
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Name
-- part 125 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=489 top=8 right=20 bottom=501
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Pname
-- part 127 (button)
-- low flags: 00
-- high flags: 8000
-- rect: left=9 top=193 right=242 bottom=53
-- title width / last selected line: 0
-- icon id / first selected line: 27212 / 27212
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Plot
----- HyperTalk script -----
on mouseUp
if card field "List" is empty then
answer "Empty list. Plot anyway?" with "Yes" or "No"
else
put "Yes" into it
end if
if it = "Yes" then
put card field "M0" into minx
put card field "M9" into maxx
push card
put card field "List" into it
visual effect iris open
go to stack "Calc Plot"
put it into field "Data"
put minx into field "Min X"
put maxx into field "Max X"
click at loc of background button "Line"
end if
end mouseUp
on mouseWithin
get hlp("Goes to the plot stack and plots values in the 'List'.")
end mouseWithin
-- part 130 (button)
-- low flags: 80
-- high flags: 8002
-- rect: left=473 top=106 right=122 bottom=491
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: I
----- HyperTalk script -----
on mouseUp
global invflg
put 0 into invflg
hide button "I"
end mouseUp
on mouseWithin
get hlp("Visible when inverse flag is set.")
end mouseWithin
-- part 128 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=499 top=328 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Fixit
----- HyperTalk script -----
on mouseUp
if the userLevel < 5 then
set userLevel to 5
show menuBar
else
set userLevel to 2
hide menuBar
end if
if the optionKey is down then
put "" into card field "Name"
put "" into card field "Pname"
end if
end mouseUp
-- part 131 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=474 top=6 right=19 bottom=486
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 8704
-- line height: 12
-- part name: xtest
-- part 136 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=465 top=26 right=56 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 25002 / 25002
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Instr
----- HyperTalk script -----
on mouseUp
visual effect dissolve
go to card "Index"
end mouseUp
on mouseWithin
get hlp("Goes to the instruction index.")
end mouseWithin
-- part 137 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=70 top=323 right=335 bottom=158
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: M0
----- HyperTalk script -----
on mouseUp
hide card field "M0"
hide card field "M9"
end mouseUp
-- part 138 (field)
-- low flags: 81
-- high flags: 0002
-- rect: left=163 top=323 right=335 bottom=251
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: M9
----- HyperTalk script -----
on mouseUp
hide card field "M0"
hide card field "M9"
end mouseUp
-- part contents for card part 83
----- text -----
Rad
-- part contents for card part 85
----- text -----
Program
-- part contents for card part 100
----- text -----
Running
-- part contents for card part 124
----- text -----
User is: Chas. Kingston
-- part contents for card part 125
----- text -----
Kingston
-- part contents for card part 131
----- text -----
1739361614